﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Backend;
using Data_Layer;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class TestApp
    {
        static void Main(string[] args)
        {            
            //Data_Layer.Connection.GetInstance().GetConnection();
            Booking booking1 = new Booking();

            booking1.BookingNO = 10143;
            booking1.PlateNO = "CJ 65 VHP";
            booking1.Status = "active";
            booking1.TimeBooked_hours = 3;

            DateTime startTime = DateTime.Now;
            string startTime_ = startTime.ToString("yyyy-MM-dd H:mm:ss");
            System.Console.WriteLine("!!!! " +startTime_ );

            booking1.StartTime = startTime_;

            DBBooking dbbooking1 = new DBBooking();
            //dbbooking1.createBooking(booking1);
            //dbbooking1.deleteBooking(1011);

            
            Booking bookingtest = new Booking();
            bookingtest = dbbooking1.readBooking(1001);

            System.Console.WriteLine("PlateNO: " + bookingtest.PlateNO + " Status: " + bookingtest.Status + " Hours Booked: " + bookingtest.TimeBooked_hours);
        }
    }
}
